<?php
	header("Content-Type: text/html;charset=utf-8");
	include("../function/_nosql.php"); //
	include("../function/function.php");
	include("../_include.user.judge.php");
	if(date('Y-m-d H:i:s') >= getClassName('kboy_user','user_vipetime','uid='.$_SESSION['kboy_userid']) ){
	 mysql_query("update kboy_user  set user_style=0   where uid=".$_SESSION['kboy_userid']);
	}
	$kboy_userid = $_SESSION['kboy_userid'];
	if($kboy_userid){
			// 是否已被删除
			if(getNewsNums("kboy_user","uid=$kboy_userid")<1){
				$_SESSION['kboy_userid'] = "";
				$_SESSION['kboy_user'] = "";
				echo re("login.php");
			}
			// 查询用户信息
			$user_sql = "select * from kboy_user where uid=$kboy_userid";
			$user_rows = mysql_query($user_sql);
			$user_rs = mysql_fetch_array($user_rows);
			$user_email = $user_rs['user_email'];
			$user_phone = $user_rs['user_phone'];
			$user_nickname = $user_rs['user_nickname'];
			$user_face = $user_rs['user_face'];
			$user_yu_e = $user_rs['user_yu_e'];
		}else{
			$_SESSION['kboy_userid'] = "";
			$_SESSION['kboy_user'] = "";
			echo re("login.php");
		}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <title>个人中心</title>
    <link rel="stylesheet" href="css/bootstrap.min.css"/>
    <link rel="stylesheet" href="css/style.css"/>
    <script type="text/javascript" src="../js/baidutongji.js"></script>
</head>
<body class="personal">
<div class="container-fluid nopadding">
    <header style="height: 55px;">
        <div class="navbar navbar-default navbar-fixed-top">
            <!--<i class="pull-left iconfont back">&#xe627;</i>-->
            <h4 class="text-center title"><?php
									$LoginH = date("G");
									if($LoginH >=6 && $LoginH < 12){
										echo "上午好";
									}elseif($LoginH >= 12 && $LoginH < 18){
										echo "下午好";
									}else{
										echo "晚上好";
									}								
								?>，<?=$user_nickname?></h4>
        </div>
    </header>
    <div class="main">
        <div class="personalbg align">
        	<img src="..<?php echo $user_face; ?>" alt=""/>
        	<p style="color: #fff;font-size: 20px;margin-top: 10px;">账户余额：<?php echo $user_yu_e; ?></p>
        </div>
        <?php if(getClassName('kboy_user','user_style','uid='.$_SESSION['kboy_userid']) == 0){?>
        <a href="../weipay/jsapi.php?WIDout_trade_no=<?php echo date('YmdHis')."_".$_SESSION['kboy_userid']; ?>" class="block vip">开通会员</a>
        <?php }else{ ?>
        <p style="padding: 20px 20px;font-size: 20px;text-align: center;">尊敬的：<i style="width: 25px;height: 20px;display: inline-block;vertical-align: middle;background: url(../images/mem_icon.png) no-repeat -80px -23px;margin-right: 5px;"></i>CVA会员</p>
        <?php } ?>
        <a href="order.php" class="block order">我的订单</a>
        <a href="yu_e.php" class="block order tongzhi">充值余额</a>
        <a href="xinxi.php" class="block notice">通知公告
            <i class="navnum"><?=getNewsNums("kboy_webad","uid=$kboy_userid and webad_isread=0")?></i>
        </a>
    </div>
    <footer>
        <nav class="navbar navbar-default navbar-fixed-bottom">
            <div class="col-xs-12 btn-group">
                <a href="index.php" class="col-xs-3 nopadding text-center bottomDiv">
                	首页
                </a> 

                <a href="huodong.php" class="col-xs-3 nopadding text-center bottomDiv">
               	活动
                </a>

                <a href="mycloset.php" class="col-xs-3 nopadding text-center bottomDiv">
             	 社区
                </a>
                
                <a href="../user_logout.php?action=logout" class="col-xs-3 nopadding text-center bottomDiv">
               	退出
                </a>
            </div>
        </nav>
    </footer>
</div>

<script type="application/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="application/javascript" src="js/bootstrap.min.js"></script>
<script type="application/javascript">
    $(function () {
        $(".good .close").click(function(){
            $(this).closest(".good").remove();
        });
    });
</script>
</body>
</html>